﻿using Jupiter.Infrastructure.Domain;
using Wips.Domain.Models;
using Wips.Infrastructure.Model;

namespace Wips.Domain.Events
{
    /// <summary>
    /// 添加发布日志事件
    /// </summary>
    public class AddPublishLogEvent : DomainEventBase
    {

        /// <summary>
        /// 空构造
        /// </summary>
        public AddPublishLogEvent() { }


        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="request"></param>
        /// <param name="nodeType"></param>
        public AddPublishLogEvent(BaseRequestModel request, EnumNodeType nodeType)
        {

            NodeType = nodeType;
            UserId = request.UserId;
            Key = request.Key;
        }

        /// <summary>
        /// 节点类型
        /// </summary>
        public EnumNodeType NodeType { get; set; }


        /// <summary>
        /// 执行的结果
        /// </summary>
        public string? Result { get; set; } = "";

        /// <summary>
        /// 执行的内容
        /// </summary>
        public string? Context { get; set; } = "";


        /// <summary>
        /// 谁执行的
        /// </summary>
        public string? UserId { get; set; }

        /// <summary>
        /// 主键
        /// </summary>
        public string? Key { get; set; }
    }


}
